<!DOCTYPE html>
<html>

<head>
  <script src="../node_modules/angular/angular.js"></script>
</head>

<body ng-app="demo">
  <div ng-controller="DemoController"></div>
  <script>
    angular
      .module('demo', [])
      .controller('DemoController', ['$scope', function ($scope) {
        $scope.age = 12

        const $childScope = $scope.$new()
        const $isolatedScope = $scope.$new(true)

        console.log('$childScope.age', $childScope.age) // 12
        console.log('$isolatedScope.age', $isolatedScope.age) // undefined
      }]);
  </script>
</body>

</html>